import {Component, OnInit, ViewEncapsulation} from '@angular/core';
import {AppService} from "../../../../app.service";
import {TableModel} from "../../../common/table/table.model";
import {ActivatedRoute} from "@angular/router";
import {APP_BASE_HREF} from "@angular/common";

@Component({
  selector: '.ss-spaces-tables-setting',
  templateUrl: './tables.setting.component.html',
  styleUrls: ['./tables.setting.component.scss'],
  styles: [":host {width: 100%;display: flex}"],
  encapsulation: ViewEncapsulation.None
})
export class TablesSettingComponent implements OnInit {

  // 是否编辑表格标题
  isEditTitle: boolean = false;
  action: string = "field";

  constructor(public $app: AppService, public activatedRoute: ActivatedRoute) {

    $app.header.setThirdNavigation("spaces/1001/tables", $app.space.title, "手动创建表格");
    activatedRoute.queryParams.subscribe(queryParams => {
      // field
      if (queryParams.action == "field") {
        this.action = "field";
      }
      // from
      else if (queryParams.action == "form") {
        this.action = "form";
      }
    });
  }

  ngOnInit(): void {
  }

}
